package top.javai.www.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import top.javai.www.dao.JobAndTriggerMapper;
import top.javai.www.pojo.JobAndTrigger;

import java.util.Date;
import java.util.List;

public class HelloJob implements BaseJob{
    @Autowired
    JobAndTriggerMapper jobAndTriggerMapper;

    public HelloJob(){

    }

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        List<JobAndTrigger> jobAndTriggerDetails = jobAndTriggerMapper.getJobAndTriggerDetails();
        System.out.println(jobAndTriggerDetails);
        System.out.println("Hello Job 执行了时间:"+new Date());






    }
}
